#ifndef FRIENDORGROUPITEM_H
#define FRIENDORGROUPITEM_H

#include <QWidget>
#include "protocol.h"
#include <QJsonArray>
#include <QJsonObject>
#include <QJsonDocument>
namespace Ui {
class FriendOrGroupItem;
}

class FriendOrGroupItem : public QWidget
{
    Q_OBJECT

public:
    explicit FriendOrGroupItem(QWidget *parent = nullptr);
    ~FriendOrGroupItem();
    void InitForUi();

    void LinkTcpSignalAndSlot();
    void setNotificationInfo(const QString& avatar, const QString& name,
                                const QString& message, const QString& time,int type);

    myuint Type;

private:
    Ui::FriendOrGroupItem *ui;

    QString m_name;

signals:

    void Sig_AddFriendRespond(myuint Type,QJsonObject Info);
    //void EmitAddFriendRepond(QString TagUser,long long Status);
private slots:
    void on_AgreeBtn_clicked();
    void on_RefuseBtn_clicked();
};

#endif // FRIENDORGROUPITEM_H
